//---------------------------------------------------------------------------
//File		:FCExportImportUtils.cpp
//Purpose	:Implementation of the utils for export/import collada files
//Data		:/23/07/2009 
//Written By:Vitaliy V;
//--------------------------------------------------------------------------
#include "stdafx.h"
#include "FCDocument/FCDMaterial.h"
#include "FCDocument/FCDLibrary.h"
#include "FCExportImportUtils.h"

namespace FCExportImportUtils {
FCDMaterial *GetMaterialBySemantic(FCDMaterialLibrary *library, fstring &semantic)
{
	FCDMaterial* fcMaterial = NULL;
	size_t entity_count = library->GetEntityCount();
	for(size_t i = 0; i < entity_count; i++ )
	{
		fcMaterial = library->GetEntity(i);
		fstring name = fcMaterial->GetName();
		if(IsEquivalent(name, semantic)){
			return fcMaterial;
		}
	}
	return fcMaterial;
}
};
	